CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(LUATEST)
AUX_SOURCE_DIRECTORY(./ LUATEST_SRC_LIST)
AUX_SOURCE_DIRECTORY(./lua LUATEST_SRC_LIST)
INCLUDE_DIRECTORIES(./)
MESSAGE(STATUS "This is cmdcontroller BINARY dir " ${LUATEST_BINARY_DIR})
MESSAGE(STATUS "This is cmdcontroller SOURCE dir " ${LUATEST_SOURCE_DIR})
MESSAGE(STATUS "This is cmdcontroller SOURCE file " ${LUATEST_SRC_LIST})
LINK_DIRECTORIES(${LUATEST_SOURCE_DIR}/../bin/)
IF(REMOD)
SET(CMAKE_CXX_FLAGS "-O3 -Wall -Werror -gdwarf-2 -m64 -DNDEBUG")
MESSAGE("build release luatest")
ELSE()
SET(CMAKE_CXX_FLAGS "-g3 -O0 -Wall -Werror -gdwarf-2 -m64 -D_DEBUG")
MESSAGE("build debug luatest")
ENDIF()
SET(EXECUTABLE_OUTPUT_PATH ${LUATEST_BINARY_DIR}/../bin)
ADD_EXECUTABLE(luatest ${LUATEST_SRC_LIST})
TARGET_LINK_LIBRARIES(luatest fkscript profiler)
